#ifndef _CRT_PROCTL_H_
#define _CRT_PROCTL_H_

#include <crt_core.hpp>

#ifdef __cplusplus
extern "C" {
#endif

#if (TARGET_OS == OS_WIN)

#define pid_null     NULL
#define pid_instance NULL
typedef DWORD _pid_t;
typedef HINSTANCE _pid_instance;

#elif (TARGET_OS == OS_POSIX)

#define pid_null     -1
#define pid_instance -1
typedef pid_t _pid_t;
typedef pid_t _pid_instance;

#elif (TARGET_OS == OS_MACH)

#define pid_null     -1
#define pid_instance -1
typedef pid_t _pid_t;
typedef pid_t _pid_instance;

#elif (TARGET_OS == OS_UNIX)

#define pid_null     -1
#define pid_instance -1
typedef pid_t _pid_t;
typedef pid_t _pid_instance;

#endif

_pid_t get_processid(void);
_pid_instance get_instance(void);

#ifdef __cplusplus
}
#endif

#endif
